/*
 * Copyright (C) 2013 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.aplink.generic.google.datetimepicker.date;

import android.content.Context;
import android.graphics.Canvas;

public class SimpleMonthView extends MonthView {

	public SimpleMonthView(final Context context) {
		super(context);
	}

	@Override
	public void drawMonthDay(final Canvas canvas, final int year,
			final int month, final int day, final int x, final int y,
			final int startX, final int stopX, final int startY, final int stopY) {
		if (this.mSelectedDay == day) {
			canvas.drawCircle(x, y - (MonthView.MINI_DAY_NUMBER_TEXT_SIZE / 3),
					MonthView.DAY_SELECTED_CIRCLE_SIZE,
					this.mSelectedCirclePaint);
		}

		if (this.mHasToday && (this.mToday == day)) {
			this.mMonthNumPaint.setColor(this.mTodayNumberColor);
		} else {
			this.mMonthNumPaint.setColor(this.mDayTextColor);
		}
		canvas.drawText(String.format("%d", day), x, y, this.mMonthNumPaint);
	}
}
